/*
 * main
 */

#include <stdio.h>
#include <stdlib.h>

#include "processor.h"

void print_usage()
{
	printf("Usage: gebeah <object_code>\n");
}

int main(int argc, char *argv[])
{
	FILE *obj_code;
	
	if(argc != 2)
	{
		print_usage();
		exit(EXIT_SUCCESS);
	}
	
	obj_code = fopen(argv[1], "r");
	if(obj_code == NULL)
	{
		printf("Error: file %s does not exists.\n", argv[1]);
		exit(EXIT_FAILURE);
	}
	
	execute(obj_code);
	
	exit(EXIT_SUCCESS);
}

